#pragma once
#include <memory>
#include "Experiment.h"
#include "ParticleSwarm.h"

class Trainer
{
public:
	Trainer(Experiment* experiment);
	void update();
	float getFitness() const;
	size_t getIterationCount() const;
	void save(std::ostream& f);
	void load(std::istream& f);
private:
	void setNeuralWeights();
	Experiment* experiment;
	std::auto_ptr<ParticleSwarm> ps;
};
